import request from '../utils/request'
import qs from 'qs'

// 渲染列表
export function getlistApi(params) {
  return request({
    url: 'classify/list',
    method: 'get',
    params,
    baseURL: 'http://localhost:2345/'
  })
}

// 新增
export function addlistApi(data) {
  return request({
    url: 'classify/addList',
    method: 'post',
    data: qs.stringify(data),
    baseURL: 'http://localhost:2345/'
  })
}

// 修改
export function updateApi(data) {
  return request({
    url: 'classify/updateList',
    method: 'post',
    data: qs.stringify(data),
    baseURL: 'http://localhost:2345/'
  })
}

// 删除

export function deleteApi(params) {
  return request({
    url: "classify/delList",
    method: 'get',
    params,
    // baseURL: 'http://localhost:2345/'
  })
}